package by.semerikov.controlers;

import by.semerikov.exceptions.ControllerNotFoundException;


public abstract class ControlFactory {
	public static ControlFactory getFactory(String role)
	{
		if("ADMIN".equalsIgnoreCase(role))
		{
			return new AdminControlFactory();
		}
		if("MANADGER".equalsIgnoreCase(role))
		{
			return new ManadgerControlFactory();
		}
		if("DRIVER".equalsIgnoreCase(role))
		{
			return new DriverControlFactory();
		}
		return new GuestControlFactory();
	}
	public abstract Controller getController(String nameCommand)throws ControllerNotFoundException;
}
